package com.fingard.dsp.bank.reqrespobj.privatesale;

import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RetAtsBase;
import com.fingard.xml.XmlTextWriter;

public class RetAtsPrivateSaleMsg extends RetAtsBase {

    public RetAtsPrivateSaleMsg(ReqRespHeader p_header) {
        retHeader = p_header;
        retXmlWriter = new XmlTextWriter();
    }
    
    public void writeRetDetailMsg(RetAtsPrivateSaleDetail p_retDetail) throws Exception {

        retXmlWriter.writeElementString("Z_BISHU", p_retDetail.Z_BISHU);
    }

    public void writeRetDetail(RetAtsPrivateSaleDetail p_retDetail) throws Exception {

        retXmlWriter.writeStartElement("DetailRecord");
        retXmlWriter.writeElementString("ID", p_retDetail.ID);
        retXmlWriter.writeElementString("DEALER_CODE", p_retDetail.DEALER_CODE);
        retXmlWriter.writeElementString("DEALER_NAME", p_retDetail.DEALER_NAME);
        retXmlWriter.writeElementString("DISCOVERY_SALE_DATE", p_retDetail.DISCOVERY_SALE_DATE);
        retXmlWriter.writeElementString("CAR_SERIES_CN", p_retDetail.CAR_SERIES_CN);
        retXmlWriter.writeElementString("CAR_TYPE_CODE", p_retDetail.CAR_TYPE_CODE);
        retXmlWriter.writeElementString("VIN", p_retDetail.VIN);
        retXmlWriter.writeElementString("KCHGZH", p_retDetail.kchgzh);
        retXmlWriter.writeElementString("KCFDJH", p_retDetail.kcfdjh);
        retXmlWriter.writeElementString("WAREHOUSENAME", p_retDetail.warehouseName);
        retXmlWriter.writeElementString("MONISTATUS", p_retDetail.moniStatus);
        retXmlWriter.writeElementString("CAR_PRICE", p_retDetail.CAR_PRICE);
        retXmlWriter.writeElementString("SALE_PLACE", p_retDetail.SALE_PLACE);
        retXmlWriter.writeElementString("REDEMPTION_DATE", p_retDetail.REDEMPTION_DATE);
        retXmlWriter.writeElementString("STATUS", p_retDetail.STATUS);
        retXmlWriter.writeElementString("RESERVE4", p_retDetail.RESERVE4);
        retXmlWriter.writeElementString("RESERVE5", p_retDetail.RESERVE5);
        retXmlWriter.writeElementString("RESERVE6", p_retDetail.RESERVE6);
        retXmlWriter.writeEndElement();
    }

}

